package com.bprogram.pojo;

import com.baomidou.mybatisplus.annotation.*;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.NoArgsConstructor;
import lombok.experimental.Accessors;

import java.io.Serializable;
import java.time.LocalDateTime;

/**
 * <p>
 * 
 * </p>
 *
 * @author cai
 * @since 2023-11-21
 */
@AllArgsConstructor
@NoArgsConstructor
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true) //开启链式编程
@TableName("video")
public class Video implements Serializable {

    private static final long serialVersionUID=1L;

    /**
     * id
     */
      @TableId(value = "videoId", type = IdType.AUTO)
    private Long videoId;

    /**
     * 上传文件的id
     */
    @TableField(value = "uploadId")
    private Long uploadId;

    /**
     * 视频地址
     */
    @TableField("videoPath")
    private String videoPath;

    /**
     * 视频文件格式
     */
    @TableField("videoType")
    private String videoType;
    
    /**
     * 视频时长
     */
    @TableField("videoLongth")
    private String videoLongth;

    /**
     * 视频标题
     */
    @TableField("videoTitle")
    private String videoTitle;

    /**
     * 视频简介
     */
    @TableField("videoIntroduct")
    private String videoIntroduct;

    /**
     * 点赞
     */
    @TableField("videoLike")
    private String videoLike;

    /**
     * 收藏
     */
    @TableField("videoCollects")
    private String videoCollects;

    /**
     * 评论
     */
    @TableField("videoComments")
    private String videoComments;

    /**
     * 转发
     */
    @TableField("videoForward")
    private String videoForward;

    /**
     * 视频播放次数
     */
    @TableField("videoPlayTimes")
    private String videoPlayTimes;

    /**
     * 视频发布者id
     */
    @TableField("upId")
    private Long upId;

    /**
     * 视频所属分区id
     */
    @TableField("videoPartitionIds")
    private String videoPartitionIds;

    /**
     * 视频所属分区
     */
    @TableField("videoPartition")
    private String videoPartition;

    /**
     * 是否允许播放（Y:是，N:否）
     */
    @TableField("isAllow")
    private String isAllow;


    /**
     * 视频封面路径
     */
    @TableField("videoCover")
    private String videoCover;
    /**
     * 视频封面文件id
     */
    @TableField("videoCoverId")
    private Long videoCoverId;

    /**
     * 是否自制（Y:是，N:否）
     */
    @TableField("isOriginal")
    private String isOriginal;


    /**
     * 创建者id
     */
    @TableField(value = "createId",fill = FieldFill.INSERT)
    private Long createId;

    /**
     * 创建人账号
     */
    @TableField(value = "createCode" ,fill = FieldFill.INSERT)
    private String createCode;

    /**
     * 创建人姓名
     */
    @TableField(value = "createName" ,fill = FieldFill.INSERT)
    private String createName;

    /**
     * 创建时间
     */
    @TableField(value = "createTime", fill = FieldFill.INSERT,insertStrategy = FieldStrategy.IGNORED)


    private LocalDateTime createTime;
    /**
     * 修改人id
     */
    @TableField(value = "updateId", updateStrategy = FieldStrategy.NOT_NULL, fill = FieldFill.INSERT_UPDATE)

    private Long updateId;

    /**
     * 修改人账号
     */
    @TableField(value = "updateCode",updateStrategy = FieldStrategy.NOT_NULL, fill = FieldFill.INSERT_UPDATE)
    private String updateCode;

    /**
     * 修改人昵称
     */
    @TableField(value = "updateName",updateStrategy = FieldStrategy.NOT_NULL, fill = FieldFill.INSERT_UPDATE)
    private String updateName;

    /**
     * 更新时间
     */
    @TableField(value = "updateTime")
    private LocalDateTime updateTime;

    /**
     * 上传视频对象
     */
    @TableField(exist = false)
    private User UploadUser;


}
